import java.util.Random;
import java.util.Scanner;

public class NumberGame {
    public static void main(String[] args) {
        Random random = new Random();
        int secretNumber = random.nextInt(100) + 1;
        Scanner scanner = new Scanner(System.in);
        int guess;

        while (true) {
            System.out.print("请输入你猜测的数字（1-100）: ");
            guess = scanner.nextInt();

            if (guess == secretNumber) {
                System.out.println("恭喜你，猜对了！");
                break;
            } else if (guess < secretNumber) {
                System.out.println("猜小了，请再试一次...");
            } else {
                System.out.println("猜大了，请再试一次...");
            }
        }

        scanner.close();
    }
}